
function PrintToConsole( ply, message )

	if( ply:EntIndex() == 0 ) then
	
		Msg( message );
	
	else
	
		ply:PrintMessage( 2, message );
		
	end

end

function SearchPlayerName( name )

	local r = { }

	for k, v in pairs( player.GetAll() ) do
	
		if( string.find( v:RPNick(), name ) ) then
		
			table.insert( r, v );
		
		end
	
	end
	
	if( #r == 1 ) then
	
		return true, r[1];
	
	elseif( #r == 0 ) then
	
		return false, "No player found with that name";
	
	else
	
		return false, "Multiple players found with that name";
	
	end

end

